# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)

require 'database_cleaner'
require 'faker'

DatabaseCleaner.strategy = :truncation

DatabaseCleaner.clean

# 10.times do 
# 	school = School.create({name: Faker::Name.name, address: Faker::Address.city})
# end

# 10.times do 
# 	student = School.all.each do |school| 
# 		Student.create({name: Faker::Name.name, age: Faker::Number.between(18, 25), school_id: school.id})
# 	end
# end

# 10.times do 
# 	class_rome = ClassName.create({name: Faker::Name.name})
# end

# 10.times do 
# 	teacher = ClassName.all.each do |class_rome| 
# 		Teacher.create({name: Faker::Name.name, class_name_id: class_rome.id})
# 	end
# end


10.times do 
	physican = Physican.create({name: Faker::Name.name})
end

# 10.times do 
# 	patients = Patient.create({name: Faker::Name.name})
# end


	Physican.all.each do |p| 
		patients = p.patients.create({name: Faker::Name.name})
	end
